import http from "./index";
enum API{
    GETMUSIC = "/info/music",
    GETMYSONGLIST = "/info/my-song-list",
    GETPLAYLIST = "/info/play-list",
    ADDPLAYLIST = "/info/insert/play-list",
    DELETEPLAYLIST = "/info/delete/play-list"
}

export const reqMusic = (id?: number ) => id ?  http.get(`${API.GETMUSIC}/${id}`) : http.get(`${API.GETMUSIC}`)

export const reqMySongList = () => http.get(API.GETMYSONGLIST)

export const reqPlayList = (id?: number) => id ? http.get(`${API.GETPLAYLIST}/${id}`) : http.get(API.GETPLAYLIST)

export const reqAddPlayList = (id:number) => http.get(`${API.ADDPLAYLIST}/${id}`)

export const reqDeletePlayList = (id: number) => http.get(`${API.DELETEPLAYLIST}/${id}`)
